package application.view.viewComponent 
{
	import application.model.VO.ModuleNavVO;
	import application.view.viewComponent.mainNav.NavList;
	import flash.events.Event;
	import ginger.events.DataEvent;
	/**
	 * ...
	 * @author Ning
	 */
	public class MainNavView extends LayoutView
	{
		private var _data:ModuleNavVO;
		private var _list:NavList;
		public function MainNavView() 
		{
			init();
		}
		private function init():void
		{
			_list = new NavList();
			addChild(_list);
			_list.addEventListener(Event.SELECT, onListSelect);
		}
		public function updateData(data:ModuleNavVO):void
		{
			_data = data;
			_list.hgap = data.hgap;
			_list.updateData(data.modules);
			updateLayout(data.layout);
		}
		public function show():void
		{
			_list.show();
		}
		public function leave():void
		{
			_list.leave();
		}
		private function onListSelect(evt:DataEvent):void
		{
			dispatchEvent(evt.clone());
		}
	}
}